package 狂神多线程;
//这个用来模拟一个倒计时
public class TestSleep2 {

    public static void main(String[] args) {
        int num=10;
        while(true){
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }

            System.out.println(num--);
            if (num<=0){
                break;
            }
        }

    }

}
